|  |  | @@ -16,7 +16,7 @@ module Agents | 
            
            
              | 16 | 16 |   | 
            
            
              | 17 | 17 |        All the default options must exist. For `infantInSeatCount`, `infantInLapCount`, `seniorCount`, and `childCount`, leave them to the default value of `0` if its not necessary. | 
            
            
              | 18 | 18 |   | 
            
            
              | 19 |  | -      Make sure `date` and `returned_date` is in this type of date format `YYYY-MO-DAY`. | 
            
            
              |  | 19 | +      Make sure `date` and `return_date` is in this type of date format `YYYY-MM-DAY`. | 
            
            
              | 20 | 20 |   | 
            
            
              | 21 | 21 |        You can choose one way ticket only by setting `roundtrip` to `false`. | 
            
            
              | 22 | 22 |   | 
            
            
            
            
              |  |  | @@ -58,7 +58,7 @@ module Agents | 
            
            
              | 58 | 58 |          'infantInSeatCount' => 0, | 
            
            
              | 59 | 59 |          'infantInLapCount'=> 0, | 
            
            
              | 60 | 60 |          'seniorCount'=> 0, | 
            
            
              | 61 |  | -        'returned_date' => '2016-04-18', | 
            
            
              |  | 61 | +        'return_date' => '2016-04-18', | 
            
            
              | 62 | 62 |          'roundtrip' => true, | 
            
            
              | 63 | 63 |          'solutions'=> 3 | 
            
            
              | 64 | 64 |        } | 
            
            
            
            
              |  |  | @@ -74,7 +74,7 @@ module Agents | 
            
            
              | 74 | 74 |      form_configurable :infantInLapCount | 
            
            
              | 75 | 75 |      form_configurable :seniorCount | 
            
            
              | 76 | 76 |      form_configurable :roundtrip, type: :boolean | 
            
            
              | 77 |  | -    form_configurable :returned_date, type: :string | 
            
            
              |  | 77 | +    form_configurable :return_date, type: :string | 
            
            
              | 78 | 78 |      form_configurable :solutions | 
            
            
              | 79 | 79 |       | 
            
            
              | 80 | 80 |      def validate_options | 
            
            
            
            
              |  |  | @@ -88,7 +88,7 @@ module Agents | 
            
            
              | 88 | 88 |        errors.add(:base, "Infant In Lap Count") unless options['infantInLapCount'].present? | 
            
            
              | 89 | 89 |        errors.add(:base, "Senior Count must exist") unless options['seniorCount'].present? | 
            
            
              | 90 | 90 |        errors.add(:base, "Solutions must exist") unless options['solutions'].present? | 
            
            
              | 91 |  | -      errors.add(:base, "Returned Date must exist") if options["returned_date"].blank? && boolify(options['roundtrip']) | 
            
            
              |  | 91 | +      errors.add(:base, "Returned Date must exist") if options["return_date"].blank? && boolify(options['roundtrip']) | 
            
            
              | 92 | 92 |      end | 
            
            
              | 93 | 93 |   | 
            
            
              | 94 | 94 |      def working? | 
            
            
            
            
              |  |  | @@ -101,7 +101,7 @@ module Agents | 
            
            
              | 101 | 101 |   | 
            
            
              | 102 | 102 |      def post_params | 
            
            
              | 103 | 103 |        if round_trip? | 
            
            
              | 104 |  | -        post_params = {:request=>{:passengers=>{:kind=>"qpxexpress#passengerCounts", :adultCount=> interpolated["adultCount"], :childCount=> interpolated["childCount"], :infantInLapCount=>interpolated["infantInLapCount"], :infantInSeatCount=>interpolated['infantInSeatCount'], :seniorCount=>interpolated["seniorCount"]}, :slice=>[ {:origin=> interpolated["origin"].to_s , :destination=> interpolated["destination"].to_s , :date=> interpolated["date"].to_s }, {:origin=> interpolated["destination"].to_s , :destination=> interpolated["origin"].to_s , :date=> interpolated["returned_date"].to_s } ], :solutions=> interpolated["solutions"]}} | 
            
            
              |  | 104 | +        post_params = {:request=>{:passengers=>{:kind=>"qpxexpress#passengerCounts", :adultCount=> interpolated["adultCount"], :childCount=> interpolated["childCount"], :infantInLapCount=>interpolated["infantInLapCount"], :infantInSeatCount=>interpolated['infantInSeatCount'], :seniorCount=>interpolated["seniorCount"]}, :slice=>[ {:origin=> interpolated["origin"].to_s , :destination=> interpolated["destination"].to_s , :date=> interpolated["date"].to_s }, {:origin=> interpolated["destination"].to_s , :destination=> interpolated["origin"].to_s , :date=> interpolated["return_date"].to_s } ], :solutions=> interpolated["solutions"]}} | 
            
            
              | 105 | 105 |        else | 
            
            
              | 106 | 106 |          post_params = {:request=>{:passengers=>{:kind=>"qpxexpress#passengerCounts", :adultCount=> interpolated["adultCount"], :childCount=> interpolated["childCount"], :infantInLapCount=>interpolated["infantInLapCount"], :infantInSeatCount=>interpolated['infantInSeatCount'], :seniorCount=>interpolated["seniorCount"]}, :slice=>[{:kind=>"qpxexpress#sliceInput", :origin=> interpolated["origin"].to_s , :destination=> interpolated["destination"].to_s , :date=> interpolated["date"].to_s }], :solutions=> interpolated["solutions"]}} | 
            
            
              | 107 | 107 |        end |